home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / p / pov / povlisti.ngs / truchet3.pov < prev    next >
Encoding:
Text File  |  1992-07-10  |  3.3 KB  |  122 lines

  1. // Persistence of Vision Raytracer Version 1.0
  2. #include "colors.inc"
  3. #include "shapes.inc"
  4. #include "textures.inc"
  5.  
  6. camera {
  7.     location <15 50 -60>
  8.     direction <0 0 4>
  9.     up  <0 1 0>
  10.     right <1.33333 0 0>
  11.     look_at <0 1 0>
  12. }
  13.  
  14. object {
  15.    light_source { <5 50 -50>
  16.    colour red 0.85 green 0.85 blue 0.85
  17.    spotlight
  18.    point_at <0 0 0>
  19.    tightness 60
  20.    radius 8
  21.    falloff 16
  22.     }
  23. }
  24. object {
  25.    light_source { <5 100 150>
  26.    colour red 0.2 green 0.2 blue 0.2
  27.    spotlight
  28.    point_at <0 0 0>
  29.    tightness 60
  30.    radius 8
  31.    falloff 16
  32.     }
  33. }
  34.  
  35.  
  36. #declare VeryDarkWood1 = color red 0.30 green 0.15 blue 0.09
  37. #declare DarkWood1 =  color red 0.60 green 0.30 blue 0.18
  38. #declare Wooden = texture {
  39.         wood
  40.         turbulence 0.04
  41.         octaves 3
  42.         scale <0.2 0.2 1>
  43.         colour_map {
  44.             [0.00 0.10 color DarkWood1 color DarkWood1]
  45.             [0.10 0.90 color DarkWood1 color VeryDarkWood1]
  46.             [0.90 1.01  color VeryDarkWood1  color VeryDarkWood1 ]
  47.          }
  48.         ambient 0.2
  49.         diffuse 0.8
  50.         specular 0.25
  51.         roughness 0.01
  52.         reflection 0.1
  53. }
  54.  
  55.  
  56. // read in the file holding the truchet tile grid data
  57. #include "tile.inc"
  58.  
  59.  
  60. // Build a wooden frame.  Four separate pieces are used so that each
  61. // can have a slightly different pattern to the woodgrain.
  62. #declare XFramePiece1 = object { box { UnitBox scale <6.5 0.5 0.5> }
  63.     texture { Wooden rotate <0 -85 0> translate <-3 0 0> }
  64. }
  65. #declare XFramePiece2 = object { box { UnitBox scale <6.5 0.5 0.5> }
  66.     texture { Wooden  rotate <0 90 0> translate <-2.5 0 0> }
  67. }
  68. #declare YFramePiece1 = object { box { UnitBox scale <0.5 6.5 0.5> }
  69.     texture { Wooden  rotate <0 0 0> translate <85 0 1> }
  70. }
  71. #declare YFramePiece2 = object { box { UnitBox scale <0.5 6.5 0.5> }
  72.     texture { Wooden  rotate <0 5 0> translate <87 3 -1>}
  73. }
  74.  
  75. // Threaded rod,  4 will be used to hold the frame together at the corners
  76. #declare Rod = object {
  77.     intersection {Z_Disk scale <0.25 0.25 7> }
  78.     texture { Chrome_Texture
  79.         gradient <0 0 1>                        // threads
  80.         color_map {
  81.             [0.0 0.5 color DimGray color LightGray ]
  82.             [0.5 1.0 color LightGray color DimGray ]
  83.         }
  84.         scale <1 1 0.1>
  85.         rotate <0 1 0>                          // pitch the threads a bit
  86.     }
  87. }
  88.  
  89. // This is one complete unit which will be repeated four times below.
  90. #declare Piece = composite {
  91.     composite { Tiles }
  92.     object {XFramePiece1 translate <0.5 -6.5 0> }
  93.     object {YFramePiece1 rotate <0 0 180> translate <-6.5 -0.5 0> }
  94.     object {XFramePiece2 rotate <0 0 180> translate <-0.5  6.5 0> }
  95.     object {YFramePiece2 translate < 6.5 0.5 0> }
  96. }
  97.  
  98.  
  99. // Build the finished piece.  3 copies of the framed object are stacked
  100. // along the Z axis, and are tied together with steel rods in each of the
  101. // four corners.
  102. composite {
  103.     composite {Piece}
  104.     composite {Piece rotate <0 0 180> translate <0 0 6> }
  105.     composite {Piece rotate <0 0 90> translate <0 0 -6> }
  106.  
  107.  
  108.     object { Rod  translate <-6.5  6.5 0> }
  109.     object { Rod  translate <-6.5 -6.5 0> }
  110.     object { Rod  translate < 6.5 -6.5 0> }
  111.     object { Rod  translate < 6.5  6.5 0> }
  112. }
  113.  
  114. // A floor plane
  115. object {
  116.     plane { <0 1 0> -7 }
  117.     texture {
  118.         color DimGray
  119.         reflection 0.25
  120.     }
  121. }
  122.